================================================================================================
 CROWN PRODUCT REFERENCE RESOURCE (PRR) API
 Copyright © 2025 – Crown Equipment Corporation
 Version 1.0 – October 2025
================================================================================================

	Welcome to the Crown Product Reference Resource (PRR) API demo package.

	This API provides authorized Crown dealers and partners with accurate, real-time product
	information directly from Crown’s own product environment. The data
	includes product images, specifications, resources, and other reference content in JSON format.

	Please review the contents of this file. If you are implementing code to access this API on a
	website, you may want to open "Implementation Guide.pdf" after this document.

------------------------------------------------------------------------------------------------
 PURPOSE
------------------------------------------------------------------------------------------------
	
	The PRR API serves as the single source of truth for Crown product data. It ensures that
	dealer and partner websites always display current and accurate information—without requiring
	manual updates when product details change.

	All data is retrieved securely in real time using GraphQL and delivered as a JSON file via HTTPS.

------------------------------------------------------------------------------------------------
 PACKAGE CONTENTS
------------------------------------------------------------------------------------------------
	This ZIP archive contains example files that demonstrate API connectivity and usage:

	    • !-read-Me-!.txt
	        -This file.

	    • !!-Implementation Guide-!!.pdf
		- A simple end-to-end sheet on how to implement the API on your site with a basic JavaScript example.

	    • !!!-Endpoint Key and Value Glossary-!!!.txt
		- A document listing all the key/value pairs in the API for parsing and displaying exactly what you want on your site and stay in sync with Crown.

	    • index.html
	        - Displays a single product from the API.

	    • product-all-example.html
	        - Displays a single page with thumbnail images showing all products available on the Endpoint (Note: the local Javascript is in this file.    

	    • product-details-page-example.html
	        - Displays a detailed product page with specs, features, and images.

		    script-singleProductEndpoint.js
	        	- Fetches and renders data for a single product.

	    product-category-example.html
	        - Displays all products in a specific category (e.g., Stackers).

		    scriptCategoryExample.js
		        - Fetches all products and filters them by forklift type or category.

		    Readme-sort-by-productCategory.txt
			- An explanation of the sample code for parsing the Endpoint and displaying products by category groups (ex: Counterbalance, Man Up Order Pickers, etc.)

	    styles.css / stylesCategoryExample.css
	        - Basic styling for layout and readability. This is just for example. All your own CSS can be applied.


------------------------------------------------------------------------------------------------
 ACCESS
------------------------------------------------------------------------------------------------
	Access to the API is limited to authorized and whitelisted domains and accounts.

	Typical endpoint structure:

	    https://www.crown.com/graphql/execute.json/product-api/{operation};{parameter}

	Examples:

	    Single Product by Path:

	      get-product-by-path;path=/content/dam/products/forklifts/wp-3200/wp-3200/en-us/wp-3200-en-us-base
	    
	    All Products by Locale:

	      get-product-by-locale;countryAndLanguage=us-en

------------------------------------------------------------------------------------------------
 HOW IT WORKS
------------------------------------------------------------------------------------------------
	Each example HTML file references an API endpoint through a “data-path” attribute, for example:

	    <div id="product-detail-wrapper"
	         data-path="https://www.crown.com/graphql/execute.json/product-api/get-product-by-path;path=/content/dam/products/forklifts/wp-3200/wp-3200/en-us/wp-3200-en-us-base">
	    </div>

	The JavaScript then:

	    1. Reads the data-path URL.
	    2. Fetches the JSON data via HTTPS.
	    3. Parses and formats it into readable HTML.
	    4. Injects the result into the #data-container element.

------------------------------------------------------------------------------------------------
 BASIC TESTING
------------------------------------------------------------------------------------------------
	1. Upload the entire “crown-API-Examples” folder to your test or staging domain.
	2. Open “index.html” or “product-category-example.html” in a browser.
	3. Confirm that live data appears (blue text or outlined items indicate API-connected data).
	4. Use the scripts as a reference for your own integration.

	If the page fails to load, check the browser console for CORS-related errors. This usually means
	your domain has not yet been authorized.

	**NOTE**

	If you test the example HTML files from your local computer - file:/// vs. https:// - you
	will get "Error loading products".

	You must put these example files on a live webserver to test them out. This is due to the
	some of the advanced security systems we have in place to protect our data and yours.

	tl;dr:

	API will not work when triggering via a local file on your computer. It must be on the live
	internet from an approved source to function correctly.

	Please contact us if you are using a domain that is different than the dealer's domain
	associated with using this API.

------------------------------------------------------------------------------------------------
 SECURITY & DATA INTEGRITY
------------------------------------------------------------------------------------------------
	• All traffic is protected by HTTPS encryption.
	• The API provides read-only access; no changes can be made to Crown systems.
	• No personal or private data is transmitted.
	• Data updates are managed and published by Crown through AEM and appear automatically
	  in the API responses.

------------------------------------------------------------------------------------------------
 ITEMS OF NOTE
------------------------------------------------------------------------------------------------
	1. Each product comes with an image in three different sizes of images for your use.

		• Desktop Version (large size)
			Example: https://assets.crown.com/is/image/crownforklifts/c5-1000?$900x900-desktop-jpg$

		• Tablet Version (medium size)
			Example: https://assets.crown.com/is/image/crownforklifts/c5-1000?$650x650-tablet-jpg$

		• Mobile / Thumbnail Version (small size)
			Example: https://assets.crown.com/is/image/crownforklifts/c5-1000?$350x350-mobile-jpg$

		When parsing the endpoint for the data to display on your site, make sure you are choosing the
		correct image to display for clarity and performance. Using the "Desktop" size for all image use
		is not recommended without a pre-fetch or a "lazy image loader" running on your site as well.

	2. Each product has three unique details links as well.

		• crown.com Series Page (our website's landing page for a product)
			Example: https://www.crown.com/en-us/forklifts/internal-combustion-counterbalance-forklifts/c-5-internal-combustion-cushion-forklift.html

		• Specification Sheet (PDF)
			Example: https://www.crown.com/dam/crown/pdfs/en-us/operator-manuals/counterbalance-trucks/c5-cushion-specifications.pdf

		• Brochure (PDF)
			Example: https://www.crown.com/dam/product-assets/forklifts/c5-1000/c5-1000/en-us/Brochure-C-5-Cushion-(SF20177)-DB.pdf

		All of the content distributed by the API is kept up-to-date by Crown, this includes the PDF's, etc.
		Please do not store a local copy of a PDF, always use the live link to the one hosted on Crown.com.


------------------------------------------------------------------------------------------------
 FURTHER RESOURCES
------------------------------------------------------------------------------------------------

	• Please read the !!-Implementation Guide-!!.txt next. It's included in this zip file.

	• Main Reference Site:
	    https://www.crown.com/product-reference-resource/en-us.html

	• Demo Examples:
	    https://media.crown.com/marketing/cfx/crown-API-Examples/


------------------------------------------------------------------------------------------------
 ~ Thank you for partnering with Crown.
================================================================================================
